package com.demo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.demo.entity.Orders;
import com.demo.mapper.OrdersMapper;
import com.demo.service.IOrdersService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 订单表; 服务实现类
 * </p>
 *
 * @author author
 * @since 2023-04-27
 */
@Service
public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> implements IOrdersService {

    public IPage<Orders> selectAllByPage(Integer pageNum, Integer pageSize){
        Page<Orders> tWorkorderPage = new Page<>(pageNum , pageSize);
        IPage<Orders> ordersIPage = this.baseMapper.selectPage(tWorkorderPage, null);
        return ordersIPage;
    }

}
